package com.usian.feign;

import com.usian.pojo.TbItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author chen
 * @date 2021/1/26 - 22:28 - 星期二
 * @project usian_parent
 * @package com.usian.feign
 * @by GGbomd猪猪侠
 */
@Component
@FeignClient("usian-cart-service")
public interface CarServerFeign {

    @RequestMapping("/insertCart")
    Boolean insertCart(@RequestParam String userId,@RequestBody Map<String, TbItem> cart);

    @RequestMapping("/selectCartByUserId")
    Map<String, TbItem> selectCartByUserId(@RequestParam String userId);
}
